//============================================================================
// Name        : pricing1.cpp
// Author      :
// Version     :
// Copyright   : Your copyright notice
// Description : Hello World in C++, Ansi-style
//============================================================================

#include <iostream>

#include "../pricer/pricer.hpp"
#include "../simulation/price_model.hpp"
using namespace std;

int _main_() {

	// test pricer
	pricer pr;
	pair<double,double> interval = pr.evaluate(40.0, 0.5, 0.16, 0.2, 0.95);
	cout << "PriceEvaluation(40.0, 0.5, 0.16, 0.2, 0.95): " << interval.first << " < price < " << interval.second << endl;

	// test BSPriceModel
	StockPriceModel prModel( 100.0 );
	prModel.setExpectedReturn( 0.16 ).setVolatility( 0.2 );
	double dt = 0.01;
	for( int i = 0; i <= 100; i++ ) {
		if( i == 0 )
			cout << "Price S[0]=" << prModel.getStrikePrice() << endl;
		else {
			double sT = prModel.getNextPrice( dt );
			cout << "Price S[" << dt*i << "]=" << sT << endl;
		}
	}
	return 0;
}

